import request from '@/utils/request'

// 获取数据
export function getPoint(deviceName) {
  return request({
    url: '/routing/xunjian/point/list',
    method: 'get',
    params: deviceName
  })
}

// 删除数据
export function delPotin(id) {
  return request({
    url: `/routing/xunjian/point/${id}`,
    method: 'delete'
  })
}

// 修改
export function updatePoint(data) {
  return request({
    url: '/routing/xunjian/point',
    method: 'put',
    data: data
  })
}


// 详情
export function getPointValue(id) {
  return request({
    url: '/routing/xunjian/point/' + id,
    method: 'get'
  })
}

// 批量导入
export function importExcel(file) {
  return request({
    url: '/routing/xunjian/point/importExcel',
    method: 'post',
    file
  })
}

// 获取数据
export function getPointAll(deviceName) {
  return request({
    url: '/routing/xunjian/point/allList',
    method: 'get',
    params: deviceName
  })
}
